#ifndef MALLHPP
#define MALLHPP

#include <string>
#include <vector>

#include "department.hpp"

class Mall
{
private:
    std::string description;
    std::vector<Department> const& departments;
public:
    float get_revenue();
    std::string get_description();
 
    Mall(std::string description, std::vector<Department> const& departments);
};

Mall::Mall(std::string description, std::vector<Department> const& departments)
    : description(description), departments(departments) {}

float Mall::get_revenue()
{
    float revenue = 0;
    // sum revenues
    for (Department department : departments)
        revenue += department.get_revenue();
    return revenue;
}

std::string Mall::get_description()
{
    return this->description;
}

#endif